/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package helpers;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.util.Date;

/**
 *
 * @author Christian
 */
public class DateAdapter extends XmlAdapter<Long, Date> {
    public Date unmarshal(Long val) throws Exception {
        return new Date(val); 
    }
    public Long marshal(Date val) throws Exception {
        return val.getTime();
    }
}
